package com.zhang;


import io.netty.channel.Channel;

/**
 * 通道管理
 * @author 98265
 */
public class ChannelManage {

    /**
     * 私有化 构造器
     */
    private ChannelManage(){}
    /**
     * ngrok服务端 channel
     */
    private static Channel ngrokServerChannel;
    /**
     * 真实后端服务器channel
     */
    private static Channel realServerChannel;

    /**
     * 设置ngrok服务端 channel
     * @param channel
     */
    public static void setNgrokServerChannel(Channel channel){
        ngrokServerChannel = channel;
    }

    /**
     * 设置真实服务端 channel
     * @param channel
     */
    public static void setRealServerChannel(Channel channel){
        realServerChannel = channel;
    }

    /**
     * 获取ngrok服务端 channel
     * @return
     */
    public static Channel getNgrokServerChannel(){
        return ngrokServerChannel;
    }
    /**
     * 获取本地服务端 channel
     * @return
     */
    public static Channel getRealServerChannel(){
        return realServerChannel;
    }
}
